<%-- 
    Document   : ApplyAttributeAdmin
    Created on : 21 janv. 2012, 14:38:08
    Author     : Gaëtan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
 
<h1 id="header"><s:property value="%{getText('apply.attribute.title')}" /></h1>
<table>
    <s:iterator value="users">

        <tr>
            <td><s:property value="prenom"/> <s:property value="nom"/></td>
            <td><s:property value="promo"/></td>
            
                <s:if test="attribution == null">
                <s:form method="post" action="validateAttributeApply" theme="simple">
                    <td><s:select name="offerid" list="offers" listKey="id" listValue="titre+' - '+entreprise+' - '+ville"/></td>
                    <s:hidden name="id" />
                    <td><s:submit value="%{getText('attribution.validate')}" /></td>
                </s:form>
                </s:if>
                <s:else>
                    <s:form method="post" action="removeAttributeApply" theme="simple">
                    <td><s:property value="attribution.titre"/> - <s:property value="attribution.entreprise"/> - <s:property value="attribution.ville"/></td>
                    <s:hidden name="id" />
                    <td><s:submit value="%{getText('attribution.remove')}" /></td>
                </s:form>
                </s:else>
            </td>
        </tr>

    </s:iterator>
</table>
 